﻿@inject IModalService ModalService

<CascadingValue Value="@ModalService">
    <BlazoredModal HideHeader="@HideHeader"
                   HideCloseButton="@HideCloseButton"
                   DisableBackgroundCancel="@DisableBackgroundCancel"
                   Position="@Position"
                   PositionCustomClass="@PositionCustomClass"
                   Class="@Class"
                   Animation="@Animation"
                   UseCustomLayout="@UseCustomLayout"
                   OverlayCustomClass="@OverlayCustomClass"
                   ContentScrollable="@ContentScrollable"
                   FocusFirstElement="@FocusFirstElement"/>
    @ChildContent
</CascadingValue>

@code {
    [Parameter] public RenderFragment ChildContent { get; set; }
    [Parameter] public bool? HideHeader { get; set; }
    [Parameter] public bool? HideCloseButton { get; set; }
    [Parameter] public bool? DisableBackgroundCancel { get; set; }
    [Parameter] public ModalPosition? Position { get; set; }
    [Parameter] public string Class { get; set; }
    [Parameter] public ModalAnimation Animation { get; set; }
    [Parameter] public bool? UseCustomLayout { get; set; }
    [Parameter] public string OverlayCustomClass { get; set; }
    [Parameter] public bool? ContentScrollable { get; set; }
    [Parameter] public bool? FocusFirstElement { get; set; }
    [Parameter] public string PositionCustomClass { get; set; }
}
